package com.xsf.pay.common.domain;

import lombok.Getter;

/**
 * 通用返回码配置
 *
 * @author 呆毛一哥
 */
@Getter
public enum CodeMsg {
    /**
     * 通用的返回码
     */
    SUCCESS(200, "操作成功"),
    FAIL(400, "操作失败"),
    PARAM_CHECK_ERROR(400, "参数异常"),
    RESTART_LOGIN(500000, "请重新登陆"),
    USER_NOT_EXIST(500004, "用户不存在"),
    ILLEGAL_ARGUMENT(500005, "参数不合法"),
    REPETITIVE_OPERATION(500006, "请勿重复操作"),
    OFTEN_LOCK_ERROR(500006, "频繁访问,请稍后再试"),
    CODE_SEND_ERROR(50001,"验证码已发送，请稍后再试"),
    CODE_EXPIRE(50001,"验证码已过期，请稍后再试"),
    CODE_ERROR(50001,"验证码错误，请稍后再试"),
    ;

    private final Integer code;
    private String msg;

    CodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public CodeMsg setMsg(String msg) {
        this.msg = msg;
        return this;
    }
}
